import Layout from '@/components/Layout.vue'
import SubSection from '@/components/common/layer/SubSection.vue'

const appRouter = [
	{
		path: "/login",
		name: "login",
		meta: {
			title: '登录'
		},
		component: () => import('@/views/System/Login/index.vue'),
	},
]

export const vocationalWorkRouter = [
	{
		pid: 0,
		id: 1,
		path: "/",
		name: "home",
		meta: {
			title: '首页'
		},
		component: Layout,
		children: [
			{
				pid: 1,
				id: 11,
				path: "/sys-modify-password",
				name: "sys-modify-password",
				meta: {
					title: '修改密码'
				},
				component: () => import('@/views/System/ModifyPassword/index.vue'),
				hidden: true,
			},
			{
				pid: 1,
				id: 12,
				path: "/sys-account",
				name: "sys-account",
				meta: {
					title: '账号管理'
				},
				component: () => import('@/views/System/Account/index.vue'),
				hidden: true,
			},
			{
				pid: 1,
				id: 13,
				path: "/sys-role",
				name: "sys-role",
				meta: {
					title: '角色管理'
				},
				component: () => import('@/views/System/Role/index.vue'),
				hidden: true,
			},
			{
				pid: 1,
				id: 14,
				path: "/",
				name: "dashboard",
				group: '数据看板',
				meta: {
					title: 'Dashboard'
				},
				component: SubSection,
				redirect: "/",
				children: [
					{
						pid: 14,
						id: 140,
						path: "/",
						name: "dashboard",
						meta: {
							title: 'Dashboard'
						},
						component: () => import('@/views/Dashboard.vue'),
						hidden: true,
					},
				]
			},
		]
	}
]

export const appRouters = [...appRouter, ...vocationalWorkRouter]